package cn.itcast.Exercise2;

class Point
{
    public void initialise (int x, int y)
    {
        this.x = x ; this.y = y ;
    }
    public void deplace (int dx, int dy)
    {
        x += dx ; y += dy ;
    }
    public int getX() { return x ; }
    public int getY() { return y ; }
    private int x, y ;
}
class PointA extends Point{
    public void affishe(Point point){
        System.out.printf("(%d,%d)\n",point.getX(),point.getY());
    }
}
public class Exercise2 {
    public static void main(String[] args) {
        Point point = new Point();
        point.deplace(1,2);
        new PointA().affishe(point);
    }
}